Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Injectable } from "@angular/core"; |
||
7 | |||
8 | @Injectable({ |
||
9 | providedIn: "root", |
||
10 | }) |
||
11 | export class AnonymousAuth extends AbstractAuth implements IAuthProvider { |
||
12 | public readonly providerOptions = {}; |
||
13 | |||
14 | public constructor(angularFireAuth: AngularFireAuth, platform: Platform) { |
||
15 | super(angularFireAuth, platform); |
||
16 | } |
||
17 | |||
18 | public async handleNativeLogin(options: any): Promise<auth.UserCredential> { |
||
19 | return this.handleBrowserLogin(); |
||
20 | } |
||
21 | |||
22 | public async handleBrowserLogin(): Promise<auth.UserCredential> { |
||
23 | return await auth().signInAnonymously(); |
||
24 | } |
||
25 | |||
26 | protected getBrowserLoginProvider(): null { |
||
27 | return null; |
||
28 | } |
||
30 |